<!-- <script>
  Ground.prototype.lastName = '贺'
  function Ground() {

  }
  var ground = new Ground()

  Father.prototype = ground
  function Father() {
    this.name = 'jingwei'
  }
  var father = new Father()

  Son.prototype = father
  function Son() {
    this.hobbit = 'reading'
  }
  var son = new Son()

  // console.log(son.name);
  console.log(son.lastName);


</script> -->


<script>
  Person.prototype = {
    name: 'hanghang',
    sayName: function() {
      console.log(this.name);
    }
  }

  function Person() {
    this.name = 'hengheng'
  }
  var p = new Person()
  p.sayName()
</script>